<MDXHeader
  title="Tooltip"
  description="A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it."
  docs="https://kobalte.dev/docs/core/components/tooltip"
/>

<ComponentPreview name="tooltip-demo" />

## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>

<TabsContent value="cli">

```bash
npx solidui-cli@latest add tooltip
```

</TabsContent>

<TabsContent value="manual">
<Steps>

<Step>Install the following dependencies: </Step>

```bash
npm install @kobalte/core
```

<Step>Copy and paste the following code into your project: </Step>

<ComponentSource name="tooltip" />

</Steps>
</TabsContent>

</Tabs>

## Usage

```tsx
import { Tooltip, TooltipContent, TooltipTrigger } from "~/components/ui/tooltip"
```

```tsx
<Tooltip>
  <TooltipTrigger>Hover Me</TooltipTrigger>
  <TooltipContent>Place content for the Tooltip here.</TooltipContent>
</Tooltip>
```
